package com.mskj.p3.service.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mskj.p3.model.Hobby;
import com.mskj.p3.model.User;
import com.mskj.p3.dao.UserDao;
import com.mskj.p3.service.UserService;

@Service
public class UserServiceImp implements UserService {
	
	@Autowired
	private UserDao ud;
	
	@Override
	public boolean login(User user) {
		return ud.login(user)!=null;
	}

	@Override
	public boolean reigist(User user,Hobby h) {
		return ud.reigist(user,h)!=null;
	}

	@Override
	public boolean alter(User user) {
		return ud.alter(user)!=null;
	}

	@Override
	public List<User> queryHobbyUser(User user) {
		ud.queryHobbyUser(user);
		return null;
	}
	
	@Override
	public User login1(User user) {
		return ud.login(user);
	}

	@Override
	public User displayUser(User u) {
		u = ud.displayUser(u);
		return u;
	}


}
